<?php
namespace app\admin\validate;

class ApiProjectValidate extends CommonValidate
{
    /**
     * 验证规则
     * @var string[]
     */
    protected $rule = [
            'spot_id'           =>  'require|number',   // 景区
            'company_id'        =>  'require|number',   // 公司
            'project_title'     =>  'require',          // 名称
            'project_total_num' =>  'require|number',   // 需求人数
            'project_date'      =>  'require',          // 游玩日期
            'project_desc'      =>  'require',          // 备注信息
    ];

    /**
     * 提示消息
     * @var string[]
     */
    protected $message = [
            'spot_id.require'           =>  '请选择景区',
            'spot_id.number'            =>  '景区值不正确',
            'company_id.require'        =>  '请选择旅行社',
            'company_id.number'         =>  '旅行社值不正确',
            'project_title.require'     =>  '请填写名称',
            'project_total_num.require' =>  '请填写需求人数',
            'project_total_num.number'  =>  '需求人数值不正确',
            'project_date.require'      =>  '请选择游玩日期',
            'project_desc.require'      =>  '备注信息不能为空',
    ];

    /**
     * 验证对象
     * @var array[]
     */
    protected $scene = [
		'add' => ['spot_id','company_id','project_title','project_total_num','project_date'],
		'edit' => ['spot_id','company_id','project_title','project_total_num','project_date'],

    ];

}